*****************
*Code to replicate analyses in:
*Hitt, Matthew P. and Kathleen Searles. 
*"Media Coverage and Public Approval of the U.S. Supreme Court"
*****************


*To replicate the analysis of the experiment reported in Table 1, 
*use "HittSearles_PolComm_ReplicationData_Experiment.dta"

*Table 1, Column 3

swilk agree accept 

*Table 1, Column 4

bysort condition: sum agree accept


*Table 1, Column 5
*Use findit cohend to install the effect size command if necessary 

cohend agree condition

cohend accept condition


*Table 1, Column 6

ranksum agree, by(condition)

ranksum accept, by(condition)



*To replicate the error correction model reported in Table 2,
*use "HittSearles_PolComm_ReplicationData_TimeSeries.dta"


*Set the data with the date variable 

tsset dq 

*The error correction model 

reg d.diff_nonindex l.diff_nonindex l.filtered_word_weighted_coverage d.filtered_word_weighted_coverage l.diff_incongruenceSTD_ipolate d.diff_incongruenceSTD_ipolate

*Long-Run Multipliers 
*LRM is lag IV/-lagDV; see De Boef and Keele 2008 for details 

di _b[l.filtered_word_weighted_coverage]/-_b[l.diff_nonindex]


di _b[l.diff_incongruenceSTD_ipolate]/-_b[l.diff_nonindex]


*The Bewley transformation to obtain standard errors on the Long-Run Multipliers
*See De Boef and Keele 2008

ivreg diff_nonindex filtered_word_weighted_coverage d.filtered_word_weighted_coverage diff_incongruenceSTD_ipolate d.diff_incongruenceSTD_ipolate ///
(d.diff_nonindex = l.diff_nonindex filtered_word_weighted_coverage l.filtered_word_weighted_coverage diff_incongruenceSTD_ipolate d.diff_incongruenceSTD_ipolate)

*The Breusch-Godfrey Test results

estat bgodfrey, lags(1/5)


*Continue using the time series data set to replicate Figures 1 and 3

tsline word_weighted_coverage

*Figure 3

tsline specific_support 



*To replicate Figure 2, 
*use "HittSearles_PolComm_ReplicationData_Networks.dta"

graph bar gameProp, over(network2, sort((mean) gameProp))  
